<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>

<body>
  <div id = "app">
    <p>用户名：{{username}}</p>
    <!-- 使用 v-model 将username进行双向绑定 -->
    <input type="text" v-model = "username" />
    <p>选中的省份：{{province}}</p>
    <select v-model = "province">
        <option value = " --- ">请选择</option>
        <option value = "1">北京</option>
        <option value = "2">上海</option>
        <option value = "3">江苏</option>
    </select>
  </div>

  <script>
    const app = new Vue({
      el:"#app",
      data:{
        username:"张三",
        province:''
      }
    })
  </script>
  </div>
</body>
</html>